The Thread Manager is now released as version 2.1. Licensing information for the Thread Manager 2.0.1 is included with this release with the intent to make it as easy as possible for developers to create and ship multithreaded applications.
Some important programming issues to remember when using the Thread Manager:
1) It is considered a programming error to allocate memory, or cause memory to be allocated, during preemptive execution time or from any thread other than the main application thread before the MaxApplZone routine has been called. See Inside Macintosh Memory for information on using memory and expanding the application heap.
2) The PowerPC Thread Manager does not support preemptive threads - never did, never will. You can only use cooperative threads with the Power Thread Manager. A future version of System Software will provide system wide preemptive tasking services.
3) You can't use 680x0 and PowerPC based threads in the same application. A 680x0 application can only use 680x0 threads and a PowerPC application can only use PowerPC based threads. It is considered a programming error to mix the two in a single application.
Compiling with the Power Thread Manager:
The information below is for use with the MPW based PowerPC compiler, found on the 'Macintosh on Risc SDK' and ETO. These CDs are purchasable through APDA.
Included in the Compiler Stuff folder is an Interfaces folder and Libraries folder. Inside the Interfaces folder you'll find CIncludes:Threads.h. This is a Universal header file (meaning can be used to compile both 680x0 and power applications). If Threads.h is not in your MPW CIncludes folder, then place this file there. For developers using old MPW versions that do not support the notion of "universal headers", there is a Threads.h file inside the "non-universal CIncludes" folder. Inside the Libraries folder you'll find ThreadsLib.xcoff, this goes in the PPCLibraries folder. In your makefile, you link against ThreadsLib.xcoff file, done as follows:
PPCLink … "{PPCLibraries}"ThreadsLib.xcoff
Strong vs. weak library links with the MakePEF tool:
Add this line to your makepef command line inside your makefile for a "strong" link:
MakePEF … -l ThreadsLib.xcoff=ThreadsLib
Add this line to your makepef command line inside your makefile for a "weak" link:
MakePEF … -l ThreadsLib.xcoff=ThreadsLib~
If you are using PPCLink version 1.2 or later you do not need to use the MakePEF tool since PPCLink does this for you:
Note: "strong" linked libraries are required to exist in the machine before the application can run. "weak" linked libraries are not required to exist to run the application, but must be verified to exist before calling into them. The entry point warnings you get from the weak link can be ignored. To make the MakePEF warnings go away, add a -w LibraryName:EntryPointName to the MakePEF command line for every entry point warning. For more information of "strong" vs. "weak" linking, refer to Inside Macintosh: RISC System Software.
If you have any bug reports or comments, please don’t hesitate to link or write. You can contact us through the following:
Alink: DEVSUPPORT (provided you have Apple developer support access)
or
Eric Anderson: ALink: Eric3, AOL: ERICTHREE
...or place your comments in the Developer Talk bulletin boards on AppleLink, the internet, Compuserve, AOL, or some other public discussion area.